<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSalaryLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('salary_log', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->default(0);
            $table->decimal('total')->default(0);//实领
            $table->decimal('basic_insurance')->default(0);
            $table->decimal('age_insurance_person')->default(0);
            $table->decimal('medic_insurance_person')->default(0);
            $table->decimal('lost_insurance_person')->default(0);
            $table->decimal('person_total')->default(0);
            $table->decimal('age_insurance_enter')->default(0);
            $table->decimal('lost_insurance_enter')->default(0);
            $table->decimal('medic_insurance_enter')->default(0);
            $table->decimal('disease')->default(0);
            $table->decimal('birth_insurance_enter')->default(0);
            $table->decimal('injure_insurance_enter')->default(0);
            $table->decimal('enter_total')->default(0);
            $table->decimal('virtual_tax')->default(0);//应税
            $table->decimal('tax')->default(0);//个税
            $table->decimal('virtual_salary')->default(0);//应发
            $table->decimal('basic_salary')->default(0);//基础工资
            $table->integer('department_id')->default(0);//部门
            $table->integer('status')->default(0);//状态
            $table->decimal('age_salary')->default(0);//工龄工资
            $table->decimal('all_total')->default(0);//费用合计
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('salary_log');
    }
}
